<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>帮助中心 - TechBlog</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            /* 亮色主题变量 */
            --bg-color: #ffffff;
            --text-color: #24292f;
            --border-color: #d0d7de;
            --card-bg: #f6f8fa;
            --header-bg: #f6f8fa;
            --accent-color: #0969da;
            --accent-hover: #0550ae;
            --code-bg: rgba(175, 184, 193, 0.2);
            --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
            --tag-bg: #ddf4ff;
            --tag-color: #0969da;
            --filter-bg: #f6f8fa;
            --input-bg: #ffffff;
            --section-spacing: 80px;
            --section-spacing-medium: 60px;
            --section-spacing-small: 40px;
        }

        .dark-theme {
            /* 深色主题变量 */
            --bg-color: #0d1117;
            --text-color: #e6edf3;
            --border-color: #30363d;
            --card-bg: #161b22;
            --header-bg: #161b22;
            --accent-color: #2f81f7;
            --accent-hover: #1c6bdb;
            --code-bg: rgba(110, 118, 129, 0.4);
            --shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.7);
            --tag-bg: #388bfd26;
            --tag-color: #58a6ff;
            --filter-bg: #161b22;
            --input-bg: #0d1117;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            transition: background-color 0.3s, color 0.3s, border-color 0.3s;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            line-height: 1.5;
        }

        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* 区块间距系统 */
        .section {
            padding: var(--section-spacing) 0;
        }

        .section--medium {
            padding: var(--section-spacing-medium) 0;
        }

        .section--small {
            padding: var(--section-spacing-small) 0;
        }

        /* 头部导航 */
        header {
            background-color: var(--header-bg);
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 0;
            position: relative;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
            font-size: 20px;
            color: var(--text-color);
            text-decoration: none;
            z-index: 101;
        }

        .logo i {
            color: var(--accent-color);
        }

        .nav-links {
            display: flex;
            gap: 24px;
        }

        .nav-links a {
            color: var(--text-color);
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s ease;
        }

        .nav-links a:hover {
            color: var(--accent-color);
        }

        .nav-links a.active {
            color: var(--accent-color);
            font-weight: 600;
        }

        .nav-actions {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .theme-toggle {
            background: none;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 8px 12px;
            color: var(--text-color);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 14px;
            transition: all 0.2s ease;
        }

        .theme-toggle:hover {
            background-color: var(--code-bg);
        }

        .mobile-menu {
            display: none;
            background: none;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-color);
            cursor: pointer;
            padding: 8px 12px;
            font-size: 16px;
            transition: all 0.2s ease;
        }

        .mobile-menu:hover {
            background-color: var(--code-bg);
        }

        /* 帮助中心头部 */
        .help-header {
            text-align: center;
            margin-bottom: 48px;
        }

        .help-header h1 {
            font-size: 48px;
            font-weight: 700;
            margin-bottom: 16px;
            line-height: 1.2;
        }

        .help-header p {
            font-size: 20px;
            margin-bottom: 32px;
            opacity: 0.8;
            line-height: 1.6;
            max-width: 700px;
            margin-left: auto;
            margin-right: auto;
        }

        /* 搜索区域 */
        .search-section {
            background-color: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 32px;
            margin-bottom: 40px;
        }

        .search-box {
            position: relative;
            max-width: 600px;
            margin: 0 auto;
        }

        .search-box input {
            width: 100%;
            padding: 16px 24px 16px 50px;
            border: 1px solid var(--border-color);
            border-radius: 30px;
            background-color: var(--input-bg);
            color: var(--text-color);
            font-size: 16px;
            transition: all 0.2s ease;
        }

        .search-box input:focus {
            outline: none;
            border-color: var(--accent-color);
            box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
        }

        .dark-theme .search-box input:focus {
            box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.2);
        }

        .search-box i {
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-color);
            opacity: 0.7;
            font-size: 18px;
        }

        /* 分类导航 */
        .categories-section {
            margin-bottom: 40px;
        }

        .section-title {
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 24px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border-color);
        }

        .categories-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 24px;
        }

        .category-card {
            background-color: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 24px;
            transition: all 0.2s ease;
            text-decoration: none;
            color: var(--text-color);
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }

        .category-card:hover {
            border-color: var(--accent-color);
            transform: translateY(-4px);
            text-decoration: none;
            color: var(--text-color);
        }

        .category-icon {
            font-size: 32px;
            color: var(--accent-color);
            margin-bottom: 16px;
        }

        .category-card h3 {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .category-card p {
            font-size: 14px;
            opacity: 0.8;
            margin-bottom: 16px;
        }

        .category-count {
            font-size: 12px;
            color: var(--accent-color);
            background-color: var(--tag-bg);
            padding: 4px 8px;
            border-radius: 12px;
            margin-top: auto;
        }

        /* FAQ区域 */
        .faq-section {
            margin-bottom: 40px;
        }

        .faq-list {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .faq-item {
            background-color: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            overflow: hidden;
        }

        .faq-question {
            padding: 20px 24px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 500;
            transition: background-color 0.2s ease;
        }

        .faq-question:hover {
            background-color: var(--code-bg);
        }

        .faq-question i {
            transition: transform 0.3s ease;
        }

        .faq-item.active .faq-question i {
            transform: rotate(180deg);
        }

        .faq-answer {
            padding: 0 24px;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease, padding 0.3s ease;
        }

        .faq-item.active .faq-answer {
            padding: 0 24px 20px;
            max-height: 500px;
        }

        .faq-answer p {
            margin-bottom: 12px;
        }

        .faq-answer p:last-child {
            margin-bottom: 0;
        }

        /* 联系支持区域 */
        .support-section {
            background-color: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 40px;
            text-align: center;
        }

        .support-section h2 {
            font-size: 28px;
            font-weight: 600;
            margin-bottom: 16px;
        }

        .support-section p {
            font-size: 16px;
            margin-bottom: 24px;
            opacity: 0.8;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .support-buttons {
            display: flex;
            gap: 16px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .btn {
            padding: 12px 24px;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 500;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid var(--border-color);
        }

        .btn-primary {
            background-color: var(--accent-color);
            color: white;
            border-color: var(--accent-color);
        }

        .btn-primary:hover {
            background-color: var(--accent-hover);
            border-color: var(--accent-hover);
        }

        .btn-secondary {
            background-color: transparent;
            color: var(--text-color);
        }

        .btn-secondary:hover {
            background-color: var(--code-bg);
        }

        /* 页脚 */
        footer {
            border-top: 1px solid var(--border-color);
            padding: 32px 0;
            text-align: center;
            font-size: 14px;
            color: var(--text-color);
            opacity: 0.8;
        }

        /* 响应式设计优化 */
        @media (max-width: 768px) {
            .container {
                padding: 0 16px;
            }

            .navbar {
                padding: 12px 0;
            }

            .logo {
                font-size: 18px;
            }

            .nav-links {
                position: absolute;
                top: 100%;
                left: 0;
                width: 100%;
                background-color: var(--header-bg);
                border-top: 1px solid var(--border-color);
                flex-direction: column;
                padding: 16px 20px;
                display: none;
                box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            }

            .nav-links.active {
                display: flex;
            }

            .nav-links a {
                padding: 12px 0;
                border-bottom: 1px solid var(--border-color);
                font-size: 16px;
            }

            .nav-links a:last-child {
                border-bottom: none;
            }

            .mobile-menu {
                display: block;
                min-height: 44px;
                min-width: 44px;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .theme-toggle,
            .mobile-menu {
                padding: 10px 14px;
            }

            .help-header h1 {
                font-size: 36px;
            }

            .help-header p {
                font-size: 18px;
            }

            .search-section {
                padding: 24px;
            }

            .search-box input {
                padding: 14px 20px 14px 46px;
            }

            .categories-grid {
                grid-template-columns: 1fr;
            }

            .support-section {
                padding: 24px;
            }

            .support-buttons {
                flex-direction: column;
                align-items: center;
            }

            /* 减少移动端的动画效果 */
            * {
                transition: none;
            }

            /* 保留必要的过渡 */
            .theme-toggle,
            .mobile-menu,
            .nav-links a,
            .btn,
            .category-card {
                transition: all 0.2s ease;
            }
        }

        @media (max-width: 480px) {
            .container {
                padding: 0 12px;
            }

            .help-header h1 {
                font-size: 32px;
            }

            .help-header p {
                font-size: 16px;
            }

            .search-section {
                padding: 20px;
            }

            .category-card {
                padding: 20px;
            }

            .faq-question {
                padding: 16px 20px;
            }

            .faq-answer {
                padding: 0 20px;
            }

            .faq-item.active .faq-answer {
                padding: 0 20px 16px;
            }

            .support-section {
                padding: 20px;
            }
        }
    </style>
</head>

<body class="light-theme">
    <header>
        <div class="container">
            <nav class="navbar">
                <a href="index.html" class="logo">
                    <i class="fas fa-code"></i>
                    TechBlog
                </a>

                <div class="nav-links">
                    <a href="index.html">首页</a>
                    <a href="article-list.html">文章</a>
                    <a href="tutorial-list.html">教程</a>
                    <a href="projects.html">项目</a>
                    <a href="about.html">关于</a>
                    <a href="help.html" class="active">帮助</a>
                </div>

                <div class="nav-actions">
                    <button class="theme-toggle" id="themeToggle">
                        <i class="fas fa-moon"></i>
                        <span>深色模式</span>
                    </button>
                    <button class="mobile-menu" id="mobileMenu">
                        <i class="fas fa-bars"></i>
                    </button>
                </div>
            </nav>
        </div>
    </header>

    <div class="container">
        <div class="section section--medium">
            <!-- 帮助中心头部 -->
            <div class="help-header">
                <h1>帮助中心</h1>
                <p>在这里找到关于TechBlog的所有问题的答案。如果您找不到所需内容，请联系我们的支持团队。</p>
            </div>

            <!-- 搜索区域 -->
            <section class="search-section">
                <div class="search-box">
                    <i class="fas fa-search"></i>
                    <input type="text" id="searchInput" placeholder="搜索帮助内容...">
                </div>
            </section>

            <!-- 分类导航 -->
            <section class="categories-section">
                <h2 class="section-title">帮助分类</h2>
                <div class="categories-grid">
                    <a href="#getting-started" class="category-card">
                        <div class="category-icon">
                            <i class="fas fa-rocket"></i>
                        </div>
                        <h3>入门指南</h3>
                        <p>新用户快速上手指南，了解基本功能和使用方法</p>
                        <span class="category-count">12篇文章</span>
                    </a>

                    <a href="#account" class="category-card">
                        <div class="category-icon">
                            <i class="fas fa-user-circle"></i>
                        </div>
                        <h3>账户管理</h3>
                        <p>关于注册、登录、密码和安全设置的帮助</p>
                        <span class="category-count">8篇文章</span>
                    </a>

                    <a href="#writing" class="category-card">
                        <div class="category-icon">
                            <i class="fas fa-pencil-alt"></i>
                        </div>
                        <h3>写作与发布</h3>
                        <p>如何创建、编辑和发布技术文章</p>
                        <span class="category-count">15篇文章</span>
                    </a>

                    <a href="#community" class="category-card">
                        <div class="category-icon">
                            <i class="fas fa-users"></i>
                        </div>
                        <h3>社区互动</h3>
                        <p>评论、点赞、关注和其他社交功能</p>
                        <span class="category-count">10篇文章</span>
                    </a>

                    <a href="#technical" class="category-card">
                        <div class="category-icon">
                            <i class="fas fa-cogs"></i>
                        </div>
                        <h3>技术问题</h3>
                        <p>解决技术故障和兼容性问题</p>
                        <span class="category-count">6篇文章</span>
                    </a>

                    <a href="#billing" class="category-card">
                        <div class="category-icon">
                            <i class="fas fa-credit-card"></i>
                        </div>
                        <h3>付费服务</h3>
                        <p>关于高级功能和订阅的信息</p>
                        <span class="category-count">5篇文章</span>
                    </a>
                </div>
            </section>

            <!-- 常见问题 -->
            <section class="faq-section">
                <h2 class="section-title">常见问题</h2>
                <div class="faq-list">
                    <div class="faq-item">
                        <div class="faq-question">
                            <span>如何注册TechBlog账户？</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            <p>注册TechBlog账户非常简单：</p>
                            <ol>
                                <li>点击页面右上角的"注册"按钮</li>
                                <li>输入您的邮箱地址和设置密码</li>
                                <li>完成邮箱验证（验证邮件可能会在垃圾邮件文件夹中）</li>
                                <li>填写个人资料信息（可选）</li>
                            </ol>
                            <p>您也可以使用GitHub或Google账户直接登录。</p>
                        </div>
                    </div>

                    <div class="faq-item">
                        <div class="faq-question">
                            <span>如何发布我的第一篇文章？</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            <p>发布文章的步骤如下：</p>
                            <ol>
                                <li>登录您的账户</li>
                                <li>点击导航栏中的"写作"或访问发布页面</li>
                                <li>填写文章标题、摘要和选择分类</li>
                                <li>使用Markdown编辑器编写内容</li>
                                <li>添加相关标签以便其他用户发现</li>
                                <li>预览文章并点击"发布"</li>
                            </ol>
                            <p>您也可以先保存为草稿，稍后再发布。</p>
                        </div>
                    </div>

                    <div class="faq-item">
                        <div class="faq-question">
                            <span>TechBlog支持哪些Markdown语法？</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            <p>TechBlog支持标准的Markdown语法以及一些扩展功能：</p>
                            <ul>
                                <li><strong>标题：</strong> # H1, ## H2, ### H3</li>
                                <li><strong>强调：</strong> *斜体*, **粗体**, ~~删除线~~</li>
                                <li><strong>列表：</strong> - 无序列表, 1. 有序列表</li>
                                <li><strong>链接：</strong> [文本](URL)</li>
                                <li><strong>图片：</strong> ![替代文本](图片URL)</li>
                                <li><strong>代码：</strong> `行内代码` 或 ```代码块```</li>
                                <li><strong>表格：</strong> 使用 | 分隔列</li>
                                <li><strong>引用：</strong> > 引用文本</li>
                            </ul>
                            <p>编辑器还提供实时预览功能，方便您查看效果。</p>
                        </div>
                    </div>

                    <div class="faq-item">
                        <div class="faq-question">
                            <span>如何提高我的文章曝光度？</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            <p>以下是一些提高文章曝光度的建议：</p>
                            <ul>
                                <li>选择准确且相关的标签</li>
                                <li>编写有吸引力的标题和摘要</li>
                                <li>确保内容质量高且有价值</li>
                                <li>使用清晰的代码示例和图片</li>
                                <li>在适当的社区分享您的文章</li>
                                <li>与其他作者互动，建立关系网络</li>
                                <li>定期更新和维护您的内容</li>
                            </ul>
                            <p>高质量的内容自然会吸引更多读者。</p>
                        </div>
                    </div>

                    <div class="faq-item">
                        <div class="faq-question">
                            <span>如何联系技术支持？</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            <p>如果您遇到技术问题，可以通过以下方式联系我们：</p>
                            <ul>
                                <li><strong>帮助中心：</strong> 首先查看本文档和FAQ</li>
                                <li><strong>社区论坛：</strong> 在社区中提问，其他用户可能已经遇到过类似问题</li>
                                <li><strong>邮箱支持：</strong> 发送邮件至 support@techblog.com</li>
                                <li><strong>反馈表单：</strong> 使用网站底部的反馈表单</li>
                            </ul>
                            <p>我们通常会在24小时内回复您的查询。</p>
                        </div>
                    </div>
                </div>
            </section>

            <!-- 联系支持 -->
            <section class="support-section">
                <h2>仍然需要帮助？</h2>
                <p>如果您在帮助中心没有找到答案，我们的支持团队随时准备为您提供帮助。</p>
                <div class="support-buttons">
                    <a href="contact.html" class="btn btn-primary">联系支持</a>
                    <a href="community.html" class="btn btn-secondary">社区论坛</a>
                </div>
            </section>
        </div>
    </div>

    <footer>
        <div class="container">
            <p>© 2023 TechBlog. 保留所有权利。</p>
            <p>采用 Github 风格设计 | 由开发者为开发者打造</p>
        </div>
    </footer>

    <script>
        // 主题切换功能
        const themeToggle = document.getElementById('themeToggle');
        const themeIcon = themeToggle.querySelector('i');
        const themeText = themeToggle.querySelector('span');

        // 检查本地存储的主题偏好
        const currentTheme = localStorage.getItem('theme') || 'light';
        if (currentTheme === 'dark') {
            document.body.classList.add('dark-theme');
            themeIcon.classList.remove('fa-moon');
            themeIcon.classList.add('fa-sun');
            themeText.textContent = '浅色模式';
        }

        themeToggle.addEventListener('click', () => {
            document.body.classList.toggle('dark-theme');

            if (document.body.classList.contains('dark-theme')) {
                themeIcon.classList.remove('fa-moon');
                themeIcon.classList.add('fa-sun');
                themeText.textContent = '浅色模式';
                localStorage.setItem('theme', 'dark');
            } else {
                themeIcon.classList.remove('fa-sun');
                themeIcon.classList.add('fa-moon');
                themeText.textContent = '深色模式';
                localStorage.setItem('theme', 'light');
            }
        });

        // 移动端菜单切换
        const mobileMenu = document.getElementById('mobileMenu');
        const navLinks = document.querySelector('.nav-links');
        const menuIcon = mobileMenu.querySelector('i');

        mobileMenu.addEventListener('click', () => {
            navLinks.classList.toggle('active');

            if (navLinks.classList.contains('active')) {
                menuIcon.classList.remove('fa-bars');
                menuIcon.classList.add('fa-times');
            } else {
                menuIcon.classList.remove('fa-times');
                menuIcon.classList.add('fa-bars');
            }
        });

        // 点击菜单外区域关闭菜单
        document.addEventListener('click', (e) => {
            if (!e.target.closest('.navbar') && navLinks.classList.contains('active')) {
                navLinks.classList.remove('active');
                menuIcon.classList.remove('fa-times');
                menuIcon.classList.add('fa-bars');
            }
        });

        // 窗口大小变化时调整菜单状态
        window.addEventListener('resize', () => {
            if (window.innerWidth > 768) {
                navLinks.classList.remove('active');
                menuIcon.classList.remove('fa-times');
                menuIcon.classList.add('fa-bars');
            }
        });

        // FAQ折叠展开功能
        document.querySelectorAll('.faq-question').forEach(question => {
            question.addEventListener('click', () => {
                const faqItem = question.parentElement;
                faqItem.classList.toggle('active');
            });
        });

        // 搜索功能
        const searchInput = document.getElementById('searchInput');
        const faqItems = document.querySelectorAll('.faq-item');
        const categoryCards = document.querySelectorAll('.category-card');

        searchInput.addEventListener('input', function () {
            const searchTerm = this.value.toLowerCase();

            // 搜索FAQ
            faqItems.forEach(item => {
                const question = item.querySelector('.faq-question span').textContent.toLowerCase();
                const answer = item.querySelector('.faq-answer').textContent.toLowerCase();

                if (question.includes(searchTerm) || answer.includes(searchTerm)) {
                    item.style.display = 'block';
                } else {
                    item.style.display = 'none';
                }
            });

            // 搜索分类
            categoryCards.forEach(card => {
                const title = card.querySelector('h3').textContent.toLowerCase();
                const description = card.querySelector('p').textContent.toLowerCase();

                if (title.includes(searchTerm) || description.includes(searchTerm)) {
                    card.style.display = 'flex';
                } else {
                    card.style.display = 'none';
                }
            });
        });

        // 平滑滚动到锚点
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();

                const targetId = this.getAttribute('href');
                if (targetId === '#') return;

                const targetElement = document.querySelector(targetId);
                if (targetElement) {
                    window.scrollTo({
                        top: targetElement.offsetTop - 100,
                        behavior: 'smooth'
                    });

                    // 移动端关闭菜单
                    if (window.innerWidth <= 768) {
                        navLinks.classList.remove('active');
                        menuIcon.classList.remove('fa-times');
                        menuIcon.classList.add('fa-bars');
                    }
                }
            });
        });
    </script>
</body>

</html>